public class generatString {
    public static String generateAa(int maxSize){
        int n = (int) (Math.random()*maxSize);
        char[] res = new char[n];
        for (int i = 0; i < n; i++) {
            res[i] = Math.random()>=0.5?(char) (Math.random()*26+'a'):(char) (Math.random()*26+'A');
        }
        return new String(res);
    }

    public static String generatenum(int maxSize){
        int n = (int) (Math.random()*maxSize);
        char[] res = new char[n];
        for (int i = 0; i < n; i++) {
//            res[i] = Math.random()>=0.999?(char) (Math.random()*3+'0'):(char) (Math.random()*7+'0');
            res[i] =Math.random()>=0.99999?'3':(char) (Math.random()>0.5?'1':'2');
        }
        return new String(res);
    }

    public static String generatea(int possibilities, int size) {
        char[] ans = new char[(int) (Math.random() * size) + 1];
        for (int i = 0; i < ans.length; i++) {
            ans[i] = (char) ((int) (Math.random() * possibilities) + 'a');
        }
        return String.valueOf(ans);
    }

    public static String generateA(int possibilities, int size) {
        char[] ans = new char[(int) (Math.random() * size) + 1];
        for (int i = 0; i < ans.length; i++) {
            ans[i] = (char) ((int) (Math.random() * possibilities) + 'A');
        }
        return String.valueOf(ans);
    }
}
